﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MegavaniaX.Util
{
    /// <summary>
    /// Static class that contains various helper utilities for actors
    /// </summary>
    public static class ActorUtil
    {
        public static bool AreColliding(Actor a, Actor b)
        {
            return 
                (((a.Right >= b.Left && a.Left <= b.Left) || (a.Left <= b.Right && a.Right >= b.Right))
                && ((a.Bottom >= b.Top && a.Top <= b.Top) || (a.Top <= b.Bottom && a.Bottom >= b.Bottom)));
        }

    }
}
